function cheng(x,...y){
    var sum=x;
    for(e of y){
        sum*=e;
    }
    return sum;
}
console.log(cheng(3));
console.log(cheng(3,4));
console.log(cheng(3,4,5));
console.log(cheng(3,4,5,6,7,8,9));